﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<!-- Resource dictionary entries should be defined here. -->
	
	
	<LinearGradientBrush x:Key="NormalBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#626262" Offset="1"/>
		<GradientStop Color="#4c4c4c" Offset="0"/>
	</LinearGradientBrush>
	
	<LinearGradientBrush x:Key="HeaderBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#6c6a6b" Offset="0"/>
		<GradientStop Color="#282828" Offset="1"/>
	</LinearGradientBrush>
	
	<SolidColorBrush x:Key="NormalOuterBorder" Color="#7a7a7a"/>
	
	<LinearGradientBrush x:Key="GlassBrush" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#96FFFFFF" Offset="0"/>
		<GradientStop Color="#28FFFFFF" Offset="0.5"/>
		<GradientStop Color="#00FFFFFF" Offset="0.5"/>
	</LinearGradientBrush>
	
	<LinearGradientBrush x:Key="DisabledBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#f4f4f4" Offset="1"/>
		<GradientStop Color="#c2c2c2" Offset="0"/>
	</LinearGradientBrush>
	
	<LinearGradientBrush x:Key="DisabledHeaderBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#f4f4f4" Offset="0"/>
		<GradientStop Color="#d7d7d7" Offset="0.7"/>
		<GradientStop Color="#c2c2c2" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="OuterBorderDisabled" Color="#cfcfcf"/>
	
	
	<BorderGapMaskConverter x:Key="BorderGapMaskConverter"/>
	<Style TargetType="{x:Type GroupBox}">
		<Setter Property="BorderBrush" Value="#D5DFE5"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Margin" Value="4"/>
		<Setter Property="Foreground" Value="White"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type GroupBox}">
					<Grid SnapsToDevicePixels="true">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<Border x:Name="Header" Grid.Column="0" Grid.Row="0" Padding="3" Background="{StaticResource HeaderBackground}" CornerRadius="4,4,0,0" BorderBrush="{StaticResource NormalOuterBorder}" BorderThickness="1,1,1,0">
							<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" RecognizesAccessKey="True"/>
						</Border>
						<Border x:Name="Glass" Grid.Column="0" Grid.Row="0" Margin="2" Background="{StaticResource GlassBrush}" CornerRadius="4,4,0,0"/>
						<Border x:Name="Container" Grid.Column="0" Grid.Row="1" Padding="3" CornerRadius="0,0,4,4" Background="{StaticResource NormalBackground}" BorderBrush="{StaticResource NormalOuterBorder}" BorderThickness="1,1,1,1">
							<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}"/>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled" Value="false">
							<Setter TargetName="Header" Property="Background" Value="{StaticResource DisabledHeaderBackground}"/>
							<Setter TargetName="Container" Property="Background" Value="{StaticResource DisabledBackground}"/>
							<Setter Property="Foreground" Value="{StaticResource NormalOuterBorder}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
				
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>